<%@ page language="java" pageEncoding="utf-8"%>
<%@taglib uri="/WEB-INF/page-base.tld" prefix="w"%>


<form method="post" id="_userselform2" action="/user/UserPage@userselQuery.page">
	<w:hidden bind="pageNum"/>
	<w:hidden bind="pageSize_"/>
	<div class="ui-queryBar" border="false" data-options="doSize:true" style="padding:4px;height:60px;">
	  	<table cellpadding="1" cellspacing="1">
			<tr>
				<td><w:text bind="bean.like" style="width:220px;" placeholder="昵称/手机号/账号"/></td>
				<td><select name="bean.grade" style="width:200px;height:26px"><option value="">-客户等级-</option><w:options bind="bean.grade" dict="UserGrade"/></select></td>
			</tr>
		</table>
		<table cellpadding="1" cellspacing="1">
			<tr>
				<td align="right" >&nbsp;注册时间：</td><td><w:text bind="bean.start" style="width:100px;" styleClass="easyui-datebox"/>-<w:text bind="bean.end" style="width:100px;" styleClass="easyui-datebox"/></td>
				<td>
					<a href="javascript:;" class="easyui-linkbutton marginR8" onclick="$w.execForm({form:$('#_userselform2'),pageNum:1})">查询</a>
					<a href="javascript:;" class="easyui-linkbutton marginR8" onclick="$('#_userselform2').get(0).reset()">重置</a>
					<a href="javascript:;" class="easyui-linkbutton" onclick="userselok()">确定</a>
				</td>
			</tr>
		</table>
	</div>
</form>
<div class="ui_line" style="margin-top:10px"></div>
<table class="ui-table" width="100%" cellpadding="1" cellspacing="1" data-options="showPage:true,
																					pageNum:<w:write bind="pageNum"/>,
																					pageSize:<w:write bind="pageSize_"/>,
																					total:<w:write bind="pagination.totalCount"/>,form:'_userselform2'">
	<thead>
		<tr class="ui_th">
			<td align="center" width="45">选择</td>
			<td>账号</td>
			<td>用户昵称</td>
			<td>客户等级</td>
			<td>手机号</td>
			<td>单位名称</td>
		</tr>
	</thead>
	<tbody>
	<w:iterate id="info" bind="resultList_">
		<tr class="ui_td state<w:write bind="#info.state"/>">
		    <td align="center"><input type="checkbox" name="primaryKey_" value="<w:write bind="#info.id"/>"></td>
			<td><w:write bind="#info.loginname"/></td>
			<td><w:write bind="#info.nickname"/></td>
			<td><w:write bind="#info.grade" dict="UserGrade"/></td>
			<td><w:write bind="#info.phone"/></td>
			<td><w:write bind="#info.comname"/></td>
		</tr>
	</w:iterate>
	</tbody>
</table>
<script>
function userselok(){
	var sellist=[];
	$("[name='primaryKey_']",$w.currWin()).each(function(){
		if(this.checked){
			var td=$(this).parent();
			sellist.push({id:this.value,loginname:td.next().text(),nickname:td.next().next().text(),grade:td.next().next().next().text(),comname:td.next().next().next().next().next().text()});
		}
	})
	$w.closeCurrWin(sellist);
}
</script>